package com.example.sx_06.suxuantv

import android.app.Activity
import android.view.KeyEvent
import android.widget.Toast
import kotlinx.android.synthetic.main.activity_main.*

open class  BaseActivity: Activity() {
   /* override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
        when (keyCode) {
            KeyEvent.KEYCODE_0 -> Toast.makeText(this, "你按下数字键0", Toast.LENGTH_SHORT).show()
            KeyEvent.KEYCODE_ENTER -> {
                currentFocus.callOnClick()
                Toast.makeText(this, "ENTER中间键", Toast.LENGTH_SHORT).show()
            }
            KeyEvent.KEYCODE_DPAD_CENTER -> {
                Toast.makeText(this, "DPAD_CENTER中间键", Toast.LENGTH_SHORT).show()
                currentFocus.callOnClick()
            }
            KeyEvent.KEYCODE_TV_CONTENTS_MENU -> {
                Toast.makeText(this, "CONTENTS_MENU菜单？", Toast.LENGTH_SHORT).show()
                return true
            }
            KeyEvent.KEYCODE_MENU -> {
                Toast.makeText(this, "KEYCODE_MENU菜单  ", Toast.LENGTH_SHORT).show()
                return true
            }
            KeyEvent.KEYCODE_DPAD_DOWN -> Toast.makeText(this, "下方向键", Toast.LENGTH_SHORT).show()
            KeyEvent.KEYCODE_DPAD_LEFT -> Toast.makeText(this, "左方向键", Toast.LENGTH_SHORT).show()
            KeyEvent.KEYCODE_DPAD_RIGHT -> Toast.makeText(this, "右方向键", Toast.LENGTH_SHORT).show()
            KeyEvent.KEYCODE_DPAD_UP -> {
            //   Toast.makeText(this, "上方向键", Toast.LENGTH_SHORT).show()
            }
            KeyEvent.KEYCODE_ALT_LEFT -> {
             //   Toast.makeText(this, "组合键alt+←", Toast.LENGTH_SHORT).show()
            }
        }
        return super.onKeyDown(keyCode, event)
    }*/

}